//
//  AnimLabel.swift
//  cxd4iphone
//
//  Created by hexy on 12/25/15.
//  Copyright © 2015 hexy. All rights reserved.
//

import UIKit

class AnimLabel: UILabel {

    override init(frame: CGRect) {
        
        super.init(frame: frame)
        
        makeUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    func makeUI() {
        
        self.textAlignment = .Center
        self.font = xx_fontOfSize(size: 14)
    }
    
    
    func showErrorMsg(msg: String) {
        
        self.text = msg
        self.textColor = Define.redColor
        self.sizeToFit()
        self.layer.shake()
    }
}
